Update GitHub API integration and versioning; standardize meta keys#100
Merged
goldlabelapps merged 5 commits intomasterfrom Apr 27, 2026
Merged
Update GitHub API integration and versioning; standardize meta keys#100goldlabelapps merged 5 commits intomasterfrom
goldlabelapps merged 5 commits intomasterfrom
Conversation
Update package version to 3.0.2 and change the CSV import path in the LinkedIn queue endpoint to reference linkedin.csv instead of linkedin_sample.csv. This switches the endpoint to use the actual data file (and preserves the 404 check) likely preparing the app for a new release or production data import.
Update package version from 3.0.2 to 3.0.3. Add app/api/github/README.md documenting the planned GitHub route that will fetch data via the GitHub API and store it in Postgres (database tables not created yet).
Normalize API meta structure: root() now returns "base" (not "base_url") and no longer emits a redundant timestamp; removed the unused epoch variable. make_meta() signature changed from title->message and its returned dict uses "message" and includes "time", "base", "version", and "severity" to provide a consistent meta payload for responses.
Introduce a new GitHub API endpoint and wire its router into the application routes. Adds app/api/github/github.py implementing GET /github which authenticates via get_api_key, queries the database for record count and column names (information_schema) using get_db_connection_direct, and returns structured meta/data (using make_meta). Adds app/api/github/__init__.py to re-export the router and updates app/api/routes.py to include the github router. Includes basic DB error handling that returns an error meta.
Introduce DB schema and seeding for GitHub ingestion and wire up routes. Adds a POST /api/github/createtable route (app/api/github/sql/create_tables.py) that creates github_accounts, github_repos, github_gists, github_projects, and github_resources tables with indexes. Adds a seed script (app/api/github/sql/seed.py) to insert realistic example rows for accounts, repos, gists, projects, and resources. Updates router initialization (app/api/github/__init__.py) to include the new create-table router. Refactors GET /github (app/api/github/github.py) to return counts and recent rows for each GitHub table, adds a helper to fetch table data, and ensures DB cursors/connections are closed in a finally block. Also updates README to document the create-table route and proposed table design.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new GitHub integration feature to the application, including API routes, database schema, and documentation to support ingesting and storing GitHub data. It adds endpoints for creating and querying GitHub-related tables in Postgres, provides a table seeding script with realistic test data, and updates the main API router to include these new routes. Minor fixes and documentation improvements are also included.
GitHub API Integration:
github_router) with endpoints for GitHub data ingestion and querying, including/githubfor retrieving data and/api/github/createtablefor creating tables. (app/api/github/__init__.py[1]app/api/github/github.py[2]app/api/github/sql/create_tables.py[3]github_routerinto the main API router so GitHub endpoints are accessible from the app. (app/api/routes.py[1] [2]Database Schema and Utilities:
github_accounts,github_repos,github_gists,github_projects, andgithub_resources, with indexes for efficient search/filtering. (app/api/github/sql/create_tables.pyapp/api/github/sql/create_tables.pyR1-R156)app/api/github/sql/seed.pyapp/api/github/sql/seed.pyR1-R332)Documentation:
app/api/github/README.mdapp/api/github/README.mdR1-R38)Other Fixes and Minor Changes:
3.0.3. (app/__init__.pyapp/init.pyL4-R4)app/api/queue/csv/linkedin.pyapp/api/queue/csv/linkedin.pyL13-R13)app/api/root.pyapp/api/root.pyL14-R17)